gRPC by Kasun Indrasiri

gRPC by Kasun Indrasiri

Author:Kasun Indrasiri
Language: eng
Format: epub
Publisher: O'Reilly Media
Published: 2020-01-13T16:00:00+00:00


Setting a two-second deadline on the current context.

Invoking the AddOrder remote method and capturing any possible errors into addErr.

Using the status package to determine the error code.

If the invocation exceeds the specified deadline, it should return an error of the type DEADLINE_EXCEEDED.

So how should we determine the ideal value for the deadline? There is no single answer to that question, but you need to consider several factors in making that choice; mainly, the end-to-end latency of each service that we invoke, which RPCs are serial and which RPCs can be made in parallel, the latency of the underlying network, and the deadline values of the downstream services. Once you are able to come up with the initial value for the deadline, fine-tune it based on the operating condition of the gRPC applications.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.